@if ($paginator->hasPages())
    <div class="paging">

        <div class="paging">

            总数：<b>{{$paginator->total()}}</b>

            @if ($paginator->onFirstPage())
                <a class="on">«上一页</a>

            @else
                <a href="{{$paginator->previousPageUrl()}}">«上一页</a>

            @endif
            @foreach ($elements as $element)
                @if (is_string($element))
                    <a>{{ $element }}</a>

                @endif
                @if (is_array($element))
                    @foreach ($element as $page => $url)
                        @if ($page == $paginator->currentPage())
                            <a class="on">{{$page}}</a>

                        @else
                            <a href="{{$url}}">{{$page}}</a>

                        @endif
                    @endforeach
                @endif
            @endforeach
            @if ($paginator->hasMorePages())
                <a href="{{$paginator->nextPageUrl()}}">下一页»</a>
            @else
                <a>下一页»</a>

            @endif
            <div class="clear"></div>


        </div>

    </div>


@endif
